package com.robot.dao.vo;

import com.robot.common.enums.IsTopEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RobotOverViewVO implements Serializable {
    private String robotId;
    private String robotName;
    private String robotUrl;
    private String robotDescription;
    private Integer robotHeat;
    private Boolean isTop;
    private String category;

    public void setIsTop(Integer isTop) {
        this.isTop= isTop != 1;
    }


    public void setIsTop(IsTopEnum isTopEnum) {
        this.isTop= isTopEnum.getValue()==IsTopEnum.TOP.getValue();
    }
}
